<?php
error_reporting(0); 
include("../config/conn.php");
include("../config/common.php");
$name=$_REQUEST[name]; 
$fenlei=$_REQUEST[fenlei]; 
$url=$_REQUEST[url]; 
$pic=$_REQUEST[pic]; 
$shijian=$_REQUEST[shijian];
$member=$_REQUEST[member];
$source=$_REQUEST[source];
$contents=$_REQUEST[contents];
if($name && $fenlei && $url && $pic && $contents){
$fl=getone("select * from se2fl WHERE name='$fenlei'");
if ($fl)
{$flid=$fl['id'];}
else
{$flid=9;}
$uid=getone("select * from ubozb order by rand()");
if ($uid)
{
$uid=$uid['id'];
$type="trends=trends+1 where id=".$uid;
upalldt(ubozb,$type);
$division="1";
}
else
{$uid="0";$division="0";}
$time=time();
$type="(`id`, `name`, `fenlei`,`cishu`,`tuijian`,`url`,`pic`,`shijian`,`uid`,`division`,`member`,`source`,`addtime`,`contents`) VALUES (null,'$name','$flid','1','2', '$url', '$pic','$shijian','$uid','$division','$member','$source','$time','$contents')";
dbinsert(se2nr,$type);
echo "添加成功";
}
else
{
echo "添加失败";
}
?>

